package com.xique.door.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xique.door.bean.domain.WxUser;
import com.xique.door.mapper.WxUserMapper;
import com.xique.door.service.IWxUserService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author shd
 * @create 2022/4/25 14:53
 */
@Service
@RequiredArgsConstructor
public class WxUserServiceImpl extends ServiceImpl<WxUserMapper, WxUser> implements IWxUserService {

    private final WxUserMapper wxUserMapper;

    @Override
    public List<WxUser> getList(WxUser wxUser) {

        LambdaQueryWrapper<WxUser> condition = Wrappers.lambdaQuery();
        condition.eq(WxUser::getOpenId, wxUser.getOpenId());

        return wxUserMapper.selectList(condition);
    }
}
